const TeamTvModel = require("../models/Team_model")
const Result = require("../beans/result")
// 获取小组
function TeamTVlist(value, msg, callback) {

    TeamTvModel.TeamTV(value, (err, data) => {
        if (err) {
            callback(new Result(err, null, msg[0], 401))
        } else {
            callback(new Result(null, data, msg[1], 200))
        }
    })
    
}
// 添加小组
function addTeamTvlist(value, msg, callback) {
    TeamTvModel.addTeamTv(value, (err, data) => {
        if (err) {
            callback(new Result(err, null, msg[0], 401))
        } else {
            callback(new Result(null, null, msg[1], 200))
        }
    })
}
// 修改小组
function patchTeamTvlist(value, msg, callback) {
    TeamTvModel.patchTeamTv(value, (err, data) => {
        if (err) {
            callback(new Result(err, null, msg[0], 401))
        } else {
            callback(new Result(null, null, msg[1], 200))
        }
    })
}
// 删除小组
function deleteTeamTvlist(value, msg, callback) {
    TeamTvModel.deleteTeamTv(value, (err, data) => {
        if (err) {
            callback(new Result(err, null, msg[0], 401))
        } else {
            callback(new Result(null, null, msg[1], 200))
        }
    })
}
module.exports = {
    TeamTVlist,
    addTeamTvlist,
    patchTeamTvlist,
    deleteTeamTvlist

}